package me.helllp.dake.generator.engine;

import com.github.javaparser.ast.body.FieldDeclaration;
import com.github.javaparser.ast.body.MethodDeclaration;

/**
 * 用于生成源码中唯一的标识信息
 */
public class ValueGenerator {
    public static String genJavaFileId(String fullName) {
        return fullName;
    }

    public static String genMethodId(MethodDeclaration method) {
        return method.getDeclarationAsString(true, true, true);
    }

    public static String genFieldId(FieldDeclaration field) {
        return field.getElementType().toDescriptor() + " " + field.getVariables().get(0).getName();
    }
}
